
//
//  earthModel.m
//  22-homework-alixingqiu
//
//  Created by dllo on 16/8/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "earthModel.h"
#import "dataModel.h"
@implementation earthModel
- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"data"]) {
        NSMutableArray<dataModel *> *array = [NSMutableArray array];
        NSArray *arr = value;
        for (NSDictionary *dic in arr) {
            dataModel *model = [dataModel modelWithDic:dic];
            [array addObject:model];
        }
        _data = array;
    }
}
- (NSString *)description
{
    return [NSString stringWithFormat:@"%@%@", _version, _data];
}
@end
